﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CsharpServer;

public class LOG : Singleton<LOG >
{
    
    public static void Log(string msg)
    {
        singleton.AddLog(msg);
    }

    public static void InfoFormat(string msg, params object[] args)
    {
        singleton.AddLog(string.Format(msg,args));
    }

    public static void DebugFormat(string msg, params object[] args)
    {
        singleton.AddLog(string.Format(msg, args));
    }

    public static void ErrorFormat(string msg, params object[] args)
    {
        singleton.AddLog(string.Format(msg, args));
    }
    public static void Error(string msg, params object[] args)
    {
        singleton.AddLog(string.Format(msg, args));
    }


    public void Init(Form1 window)
    {
        m_window = window;
    }

    public void AddLog(string msg)
    {
        m_window.AddLog(msg);
    }

    public void ClearLog()
    {
        m_window.ClearLog();
    }

    private Form1 m_window;

}
